home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
mxlibs
/
dwstk102
/
readme
< prev
next >
Wrap
Text File
|
1995-04-19
|
7KB
|
145 lines
This is the readme file for v1.02 of DiamondWare's Sound ToolKit.
README.TXT was finalized on 04/12/95.
A product like the Sound ToolKit is a complicated beast. We can't
overemphasize the importance of reading the documentation. There
are many caveats and subtle ways to improve the performance of your
application in the docs. We didn't go to all the effort of writing,
just so everyone wouldn't read anyway. READ THE MANUAL! <g>
This file is an appendix, and is intended primarily for users who
are already familiar with the documentation.
If you have the shareware version, STKMAN.TXT is up to date. Unless
you're upgrading from v1.00, you won't find anything new in here.
This file tells you what's changed.
If you have the registered version, read the printed manual first.
Then read this. It contains everything added since the book was
printed.
Improvements
------------
The API did not change, and no working code was broken.
o The STK now allows re-entrancy.
o dws_DetectHardWare checks the BLASTER environment variable.
o The bass drum is louder, deeper, and punchier.
o The STK checks the interrupt flag before some STK functions.
o We added OPLKBD.EXE (registered version only).
o The music playback is now more sensitive to note velocities.
You can now call any STK function from any background task,
including an ISR. If the STK can't deal with the call right then,
it will return a (new) error. dws_BUSY means that you should call
again later (your next timer tick, or some other soon time). IF
YOU'RE CALLING THE STK ONLY FROM THE FOREGROUND, THIS ERROR CANNOT
OCCUR.
PLAYDWM and PLAYDWD have been updated to show detection of this new
error condition (although neither program can actually generate it).
dws_DetectHardWare now uses the BLASTER environment variable to help
it find sound boards. It looks for the sound board's port at the
address specified in the BLASTER variable. It will also use the
BLASTER's IRQ and DMA settings as a last resort -- if it's unable to
find them from examining the hardware.
When you call dws_DetectHardWare, dws_Init, or dws_Kill, interrupts
must be enabled. If they're not, you'll get a (new) error.
dws_IRQDISABLED means that IRQs are disabled -- but to work
properly, the STK function you just called requires them to be
_enabled_. This error shouldn't occur, unless you're developing
interrupt service routines, and other non-mainstream code.
For registered users, we added a new program: OPLKBD.EXE. This
allows you to load an .IBK file, and "play" notes from it on your
101 keyboard (including polyphony). It's useful for tweaking .IBK
files.
Bugs Fixed
----------
o MID2DWM.EXE no longer requires an FPU.
o Some "clickiness" in music playback was eliminated.
o SB16 mixer settings now restored properly upon dws_Kill.
o Sequencing sounds no longer causes the STK to enter a bad state.
o dres.baseport is set even if dws_DetectHardWare can't find IRQ or DMA.
o On Windows Sound System, under Windows, dws_DetectHardWare now works.
o Inside the STK, interrupts are disabled where necessary.
o dws_Kill is slightly quieter.
o FM chip reset is more complete.
o Obscure change instrument bug fixed.
o On OPTI chipset boards (MAD16), mixer and autodetect now works better.
o Auto-initialized DMA mode is used whenever supported by the hardware.
Because we're using auto-init DMA mode (don't worry if you don't
know what this means -- it's a detail within the STK), dws_DSetRate
makes some noise on some sound boards. We recommend (though don't
require) that you change rates during periods of silence.
Additional Docs
---------------
We wrote this addendum to address common questions raised by users.
The STK music playback engine may behave differently than you'd
expect. The following is a brief discussion of two bona fide
features which may cause some unexpected problems.
The STK is extremely sensitive to velocity. If you play a song and
the drums or an instrument sound faint (or loud), this is why.
Change the output level of the instrument patch, or use your
sequencer to bring up the volume of the problem track.
The STK will allow notes of bells and strings to "ring out" after
they are "key released". If this is causing undesired effects,
simply make your instrument patches "sustaining". The STK will shut
such notes down immediately when they are released.
Finding the user's sound board is non-trivial, because the user
often doesn't even know what brand he owns, let alone its settings.
So the STK asks the hardware directly.
It does a good job, but there are some potential problems.
Sometimes, the STK may be unable to find one or more sound hardware
parameters (almost always the problem lies with finding the DMA
channel).
The capability field in the dws_DETECTRESULTS struct will tell you
if the STK found everything it needed for music and for digitized.
If both capability flags are set, then you have nothing further to
do; music and sound will work.
However, only the dws_capability_FM flag might be set. This may be
because the user has music-only hardware, or it may be that (for
example) the STK was unable to find the DMA channel. To tell the
difference, look at the baseport field of the dws_DETECTRESULTS
struct. If this field returns as either 65535 or 388h, this means
that no digitized-capable sound hardware is present (or the user's
drivers aren't installed). If this field returns with any other
value, it means that digitized hardware exists. Look at the digirq
and digdma fields. If either or both of these are set to 65535, it
means that the STK couldn't autodetect them (and the BLASTER
environment variable was either not present, or was wrong).
Planning ahead for this, you should have a screen where the user can
type in port, DMA, and IRQ channel. Don't require him to do this,
but make this option available. Take the settings you are given,
and plug them into the dws_OVERRIDES struct. Then call
dws_DetectHardWare again.
Don't simply look at the capability field of the dws_DETECTRESULTS.
Its boolean flags simply indicate whether or not we figured out
everything we needed to know about music and digitized sound. It
can't tell you, for example, if we have a port and an IRQ level, but
no DMA channel. To determine this, look at the baseport, digdma,
and digirq fields. If baseport is 65535 (or 388h), then we found no
digitized capability. It's virtually certain that none is present.
If baseport is 220h, digdma is 65535 and digirq is 7, then we
couldn't determine the DMA channel. Ask the user! It beats dimming
out your sound option.
We provide a new example program to registered users: SETUP.C, which
handles setup of sound settings, and configuration files. It isn't
pretty (using just printf and scanf), but it illustrates some
important concepts.